import {
  createRouter,
  createWebHashHistory,
  RouterOptions,
  RouteRecordRaw,
} from "vue-router";
import { constantRouterMap } from "./router";

// export const routes: Array<RouteRecordRaw>= ...constantRouterMap: Array<RouteRecordRaw>([
// ])

const router = createRouter({
  history: createWebHashHistory(),
  routes: constantRouterMap,
  // scrollBehavior(to, from, savedPosition) {
  //   if (savedPosition) {
  //     return savedPosition;
  //   } else {
  //     return {
  //       x: 0,
  //       y: 0,
  //     };
  //   }
  // },
  scrollBehavior() {
    return {
      left: 0,
      top: 0,
    };
  },
});
export default router;
